package com.ruoyi.csdn.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.csdn.mapper.CsdnLogMapper;
import com.ruoyi.csdn.domain.CsdnLog;
import com.ruoyi.csdn.service.ICsdnLogService;

/**
 * CSDN文章发布记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-30
 */
@Service
public class CsdnLogServiceImpl implements ICsdnLogService 
{
    @Autowired
    private CsdnLogMapper csdnLogMapper;

    /**
     * 查询CSDN文章发布记录
     * 
     * @param id CSDN文章发布记录主键
     * @return CSDN文章发布记录
     */
    @Override
    public CsdnLog selectCsdnLogById(Long id)
    {
        return csdnLogMapper.selectCsdnLogById(id);
    }

    /**
     * 查询CSDN文章发布记录列表
     * 
     * @param csdnLog CSDN文章发布记录
     * @return CSDN文章发布记录
     */
    @Override
    public List<CsdnLog> selectCsdnLogList(CsdnLog csdnLog)
    {
        return csdnLogMapper.selectCsdnLogList(csdnLog);
    }

    /**
     * 新增CSDN文章发布记录
     * 
     * @param csdnLog CSDN文章发布记录
     * @return 结果
     */
    @Override
    public int insertCsdnLog(CsdnLog csdnLog)
    {
        csdnLog.setCreateTime(DateUtils.getNowDate());
        return csdnLogMapper.insertCsdnLog(csdnLog);
    }

    /**
     * 修改CSDN文章发布记录
     * 
     * @param csdnLog CSDN文章发布记录
     * @return 结果
     */
    @Override
    public int updateCsdnLog(CsdnLog csdnLog)
    {
        return csdnLogMapper.updateCsdnLog(csdnLog);
    }

    /**
     * 批量删除CSDN文章发布记录
     * 
     * @param ids 需要删除的CSDN文章发布记录主键
     * @return 结果
     */
    @Override
    public int deleteCsdnLogByIds(Long[] ids)
    {
        return csdnLogMapper.deleteCsdnLogByIds(ids);
    }

    /**
     * 删除CSDN文章发布记录信息
     * 
     * @param id CSDN文章发布记录主键
     * @return 结果
     */
    @Override
    public int deleteCsdnLogById(Long id)
    {
        return csdnLogMapper.deleteCsdnLogById(id);
    }
}
